package com.lanyam.travel.base.entity;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author rosson
 * @since 2020-02-22
 */
@TableName("travel_order")
public class TravelOrder extends Model<TravelOrder> {

    private static final long serialVersionUID = 1L;
    @JsonProperty(value="id")
    private String id;
    /**
     * 订单类型(0:商品订单,1:抢购订单)
     */
    @JsonProperty(value="orderType")
    @TableField("order_type")
    private Integer orderType;
    /**
     * 产品id(线路/景区/酒店id)
     */
    @JsonProperty(value="productId")
    @TableField("product_id")
    private String productId;
    
    /**
     * 下单人id
     */
    @JsonProperty(value="orderUserid")
    @TableField("order_userid")
    private String orderUserid;
    /**
     * 下单人名称
     */
    @JsonProperty(value="orderUsername")
    @TableField("order_username")
    private String orderUsername;
    /**
     * 创建订单时间
     */
    @JsonProperty(value="orderTime")
    @TableField("order_time")
    private Date orderTime;
    /**
     * 订单失效时间
     */
    @JsonProperty(value="overrdueTime")
    @TableField("overrdue_time")
    private Date overrdueTime;
    /**
     * 订单总金额,优惠前的总金额
     */
    @JsonProperty(value="orderAmount")
    @TableField("order_amount")
    private BigDecimal orderAmount;
    /**
     * 订单联系人
     */
    @JsonProperty(value="contact")
    @TableField("contact")
    private String contact;
    /**
     *联系人电话
     */
    @JsonProperty(value="telephone")
    @TableField("telephone")
    private String telephone;
    /**
     * 订单实际金额，优惠后的总金额
     */
    @JsonProperty(value="realAmount")
    @TableField("real_amount")
    private BigDecimal realAmount;
    /**
     * 实际支付的金额
     */
    @JsonProperty(value="payAmount")
    @TableField("pay_amount")
    private BigDecimal payAmount;
    /**
     * 订单支付状态(0:未支付,1:已支付,2：退款,9:支付过期)
     */
    @JsonProperty(value="payStatus")
    @TableField("pay_status")
    private Integer payStatus;
    /**
     * 支付时间(支付完成后写入)
     */
    @JsonProperty(value="payTime")
    @TableField("pay_time")
    private Date payTime;
    /**
     * 描述
     */
    @JsonProperty(value="remarks")
    @TableField("remarks")
    private String remarks;
    /**
     *订单支付后产生的随机码，用于验票
     */
    @JsonProperty(value="randomCode")
    @TableField("random_code")
    private String randomCode;
    /**
     * 订单预定使用日期
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
    @JsonProperty(value="bookUseDate")
    @TableField("book_use_date")
    private Date bookUseDate;
    /**
     * 订单预定后的失效时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
    @JsonProperty(value="bookEndDate")
    @TableField("book_end_date")
    private Date bookEndDate;
    /**
     * 出行状态(0:未出行,1:已出行)
     */
    @JsonProperty(value="tripStatus")
    @TableField("trip_status")
    private Integer tripStatus;
    /**
     * 出行时间
     */
    @JsonProperty(value="tripTime")
    @TableField("trip_time")
    private Date tripTime;
    /**
     * 订单审核状态，0未到审核这一步，1待一次审核，2一次审核未通过，3待二次审核，4二次审核未通过，5二次审核通过
     */
    @JsonProperty(value="verifyStatus")
    @TableField("verify_status")
    private Integer verifyStatus;
    /**
     * 第一次审核的人员id
     */
    @JsonProperty(value="verifyUserId")
    @TableField("verify_user_id")
    private String verifyUserId;
    /**
     * 第一次审核时间
     */
    @JsonProperty(value="verifyTime")
    @TableField("verify_time")
    private Date verifyTime;
    /**
     * 第二次审核人员id
     */
    @JsonProperty(value="confirmUserId")
    @TableField("confirm_user_id")
    private String confirmUserId;
    /**
     *第二次审核时间
     */
    @JsonProperty(value="confirmTime")
    @TableField("confirm_time")
    private Date confirmTime;
    /**
     * 供应商id
     */
    @JsonProperty(value="supplyId")
    @TableField("supply_id")
    private String supplyId;

    /**
     * 是否计算提现
     */
    @TableField("calc_cash")
    @JsonProperty(value="calcCash")
    private Integer calcCash;
    
    /**
     * 线下订单分销员id
     */
    @TableField("distr_user_id")
    @JsonProperty(value="distrUserId")
    private String distrUserId;


    
    public Integer getCalcCash() {
		return calcCash;
	}

	public void setCalcCash(Integer calcCash) {
		this.calcCash = calcCash;
	}

	public String getDistrUserId() {
		return distrUserId;
	}

	public void setDistrUserId(String distrUserId) {
		this.distrUserId = distrUserId;
	}

	public String getProductId() {
		return productId;
	}

	public void setProductId(String productId) {
		this.productId = productId;
	}

	public String getId() {
        return id;
    }

    public TravelOrder setId(String id) {
        this.id = id;
        return this;
    }

    public Integer getOrderType() {
        return orderType;
    }

    public TravelOrder setOrderType(Integer orderType) {
        this.orderType = orderType;
        return this;
    }

    public String getOrderUserid() {
        return orderUserid;
    }

    public TravelOrder setOrderUserid(String orderUserid) {
        this.orderUserid = orderUserid;
        return this;
    }

    public String getOrderUsername() {
        return orderUsername;
    }

    public TravelOrder setOrderUsername(String orderUsername) {
        this.orderUsername = orderUsername;
        return this;
    }

    public Date getOrderTime() {
        return orderTime;
    }

    public TravelOrder setOrderTime(Date orderTime) {
        this.orderTime = orderTime;
        return this;
    }

    public Date getOverrdueTime() {
        return overrdueTime;
    }

    public TravelOrder setOverrdueTime(Date overrdueTime) {
        this.overrdueTime = overrdueTime;
        return this;
    }

    public BigDecimal getOrderAmount() {
        return orderAmount;
    }

    public TravelOrder setOrderAmount(BigDecimal orderAmount) {
        this.orderAmount = orderAmount;
        return this;
    }

    public String getContact() {
        return contact;
    }

    public TravelOrder setContact(String contact) {
        this.contact = contact;
        return this;
    }

    public String getTelephone() {
        return telephone;
    }

    public TravelOrder setTelephone(String telephone) {
        this.telephone = telephone;
        return this;
    }

    public BigDecimal getRealAmount() {
        return realAmount;
    }

    public TravelOrder setRealAmount(BigDecimal realAmount) {
        this.realAmount = realAmount;
        return this;
    }

    public BigDecimal getPayAmount() {
        return payAmount;
    }

    public TravelOrder setPayAmount(BigDecimal payAmount) {
        this.payAmount = payAmount;
        return this;
    }

    public Integer getPayStatus() {
        return payStatus;
    }

    public TravelOrder setPayStatus(Integer payStatus) {
        this.payStatus = payStatus;
        return this;
    }

    public Date getPayTime() {
        return payTime;
    }

    public TravelOrder setPayTime(Date payTime) {
        this.payTime = payTime;
        return this;
    }

    public String getRemarks() {
        return remarks;
    }

    public TravelOrder setRemarks(String remarks) {
        this.remarks = remarks;
        return this;
    }

    public String getRandomCode() {
        return randomCode;
    }

    public TravelOrder setRandomCode(String randomCode) {
        this.randomCode = randomCode;
        return this;
    }

    public Date getBookUseDate() {
        return bookUseDate;
    }

    public TravelOrder setBookUseDate(Date bookUseDate) {
        this.bookUseDate = bookUseDate;
        return this;
    }

    public Date getBookEndDate() {
        return bookEndDate;
    }

    public TravelOrder setBookEndDate(Date bookEndDate) {
        this.bookEndDate = bookEndDate;
        return this;
    }

    public Integer getTripStatus() {
        return tripStatus;
    }

    public TravelOrder setTripStatus(Integer tripStatus) {
        this.tripStatus = tripStatus;
        return this;
    }

    public Date getTripTime() {
        return tripTime;
    }

    public TravelOrder setTripTime(Date tripTime) {
        this.tripTime = tripTime;
        return this;
    }

    public Integer getVerifyStatus() {
        return verifyStatus;
    }

    public TravelOrder setVerifyStatus(Integer verifyStatus) {
        this.verifyStatus = verifyStatus;
        return this;
    }

    public String getVerifyUserId() {
        return verifyUserId;
    }

    public TravelOrder setVerifyUserId(String verifyUserId) {
        this.verifyUserId = verifyUserId;
        return this;
    }

    public Date getVerifyTime() {
        return verifyTime;
    }

    public TravelOrder setVerifyTime(Date verifyTime) {
        this.verifyTime = verifyTime;
        return this;
    }

    public String getConfirmUserId() {
        return confirmUserId;
    }

    public TravelOrder setConfirmUserId(String confirmUserId) {
        this.confirmUserId = confirmUserId;
        return this;
    }

    public Date getConfirmTime() {
        return confirmTime;
    }

    public TravelOrder setConfirmTime(Date confirmTime) {
        this.confirmTime = confirmTime;
        return this;
    }

    public String getSupplyId() {
        return supplyId;
    }

    public TravelOrder setSupplyId(String supplyId) {
        this.supplyId = supplyId;
        return this;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "TravelOrder{" +
        ", id=" + id +
        ", orderType=" + orderType +
        ", orderUserid=" + orderUserid +
        ", orderUsername=" + orderUsername +
        ", orderTime=" + orderTime +
        ", overrdueTime=" + overrdueTime +
        ", orderAmount=" + orderAmount +
        ", contact=" + contact +
        ", telephone=" + telephone +
        ", realAmount=" + realAmount +
        ", payAmount=" + payAmount +
        ", payStatus=" + payStatus +
        ", payTime=" + payTime +
        ", remarks=" + remarks +
        ", randomCode=" + randomCode +
        ", bookUseDate=" + bookUseDate +
        ", bookEndDate=" + bookEndDate +
        ", tripStatus=" + tripStatus +
        ", tripTime=" + tripTime +
        ", verifyStatus=" + verifyStatus +
        ", verifyUserId=" + verifyUserId +
        ", verifyTime=" + verifyTime +
        ", confirmUserId=" + confirmUserId +
        ", confirmTime=" + confirmTime +
        ", supplyId=" + supplyId +
        "}";
    }
   
}
